import request from '@/utils/request'

// 获取权限列表
export const getPermissionList = () => request.get('/sys/permission')

// 获取权限点详情
export const getPermissionDetail = id => request.get(`/sys/permission/${id}`)

// 新增权限
export const postPermission = data => request.post('/sys/permission', data)

// 删除权限点
export const deletePermission = id => request.delete(`/sys/permission/${id}`)

// 修改权限点
export const updatePermission = data => request.put(`/sys/permission/${data.id}`, data)
